#ifndef __WAV_H
#define __WAV_H

#include <iostream>
#include <fstream>
#include <string>


using namespace std;

class wav
{
public:
    wav(void);
    ~wav(void);

private:
    typedef struct
    {
        unsigned int rate;
        unsigned int bits;
        unsigned int channel;
        unsigned int sampleSize;
        unsigned int byteSize;
        unsigned int pcmDataStart;
    }__WAV_INFO;

    __WAV_INFO wavInfo;
    unsigned int dataReadIndex;
    ifstream *wavFile;

public:
    int open(string filePath);
    unsigned int readSamples(char *buffer,unsigned int samples);
    unsigned int getPCMByteSize(void);
    unsigned int getRate(void);
    unsigned short getBits(void);
    unsigned short getChannel(void);
};


#endif